Gölge Efekti Ekle
Metin Üzerinde Gölge Efektlerini Uygulama
Gölge etkileri, karakterlerin arkasında gölge ofseti oluşturarak metne derinlik ve boyut kazandırır. IronWord provides predefined shadow presets through the Shadow class, offering various shadow styles that can be applied quickly without manual configuration.
To add a shadow effect, create a TextStyle and configure its TextEffect property with a shadow preset such as Shadow.OuterShadow1. These static named instances from the Shadow class provide professionally designed shadow configurations with appropriate blur, distance, and angle settings. Dış gölge varyantları, gölgeyi metinden uzağa projeler ve yükseltilmiş bir görünüm oluşturur.
Once the text style is configured with the desired shadow effect, create a Run object containing TextContent and assign the style to the run. Add the styled run to a paragraph using AddChild, then include the paragraph in the document. Bu yaklaşım IronWord'un belge hiyerarşisini izler ve gölge efektinin çıktı dosyasına doğru bir şekilde uygulanmasını sağlar.
Kod Açıklaması
Bir kaç satırlık kod ile Word belgesinde metne gölge efekti eklenebilir. For completeness, let's first initialize a new WordDocument instance called doc. Then, a TextStyle object is created and configured to incorporate a shadow effect by assigning the Shadow.OuterShadow1 static named instance to the TextEffect property.
To add the styled text with the shadow effect, a Paragraph is created, then a Run object is created containing TextContent with "Hello World". The configured textStyle is assigned to the Run, applying the shadow effect. The Run is added to the Paragraph using AddChild, and the Paragraph is added to the document. Bu, doküman hiyerrarşisini takip eder: Doküman → Paragraf → Kosu → TextContent. Son olarak, Word belgesini dışa aktarın.
Daha fazla örnek ve gösterim için lütfen şu makaleye gidin: Metne Gölge Efekti Nasıl Eklenir

